﻿@using WebEntities;
@using WebsiteUI.Extensions;

@{
    ViewBag.Title = "资讯动态_城市垃圾处理网";
    ViewBag.ClassHead = "head_bg5";
}
<div class="main_l">
    <div class="pageTitle">
        <i class="bgPic fl"></i>
        <div class="fl">
            资讯动态</div>
    </div>
    <div class="ad_show">
        @Html.Action("ADScroll", "PublicPartialView", new { suiteId = 100 })
    </div>
    <div class="contentBox">
        <div class="con_bar">
            <span class="fl tit">通知公告</span><span class="fr"><a href="/list/index/@ViewBag.BulletinID">更多>></a></span>
            <div class="cls">
            </div>
        </div>
        <div class="con_Main">
        @{
            List<WI_News> bulList = ViewBag.BulletinList as List<WI_News>;
            foreach (var bullin1 in bulList.Take(2))
            {
                string imgPath = string.IsNullOrWhiteSpace(bullin1.NewsCover) ? "/Resource/images/test3.png" : bullin1.NewsCover;
            <div class="con_m_show">
                <div class="fl">
                    <img src="@imgPath" alt="" onerror="this.src='/Resource/images/test3.png';" /></div>
            @{
                string htmlDescr = Server.HtmlDecode(bullin1.Description);
                string plainDescr = HtmlWorkshop.StripHtml(htmlDescr ?? string.Empty);
            }
                <div class="con_m_info fr gray2">@Html.Raw(HtmlWorkshop.CutTitle(plainDescr ?? string.Empty, 45))<a class="linkColor" href="/detail/index/@bullin1.NewsID" title="@bullin1.NewsTitle" target="_blank">[详细]</a>
                </div>
                <div class="cls"></div>
            </div>
            }
        }
        </div>
    </div>
    <div class="contentBox">
        <div class="con_bar">
            <span class="fl tit">知识专栏</span><span class="fr"><a href="/list/index/@ViewBag.KnowledgeID">更多>></a></span>
            <div class="cls">
            </div>
        </div>
        <div class="con_Main">
            <ul>
            @{
                List<WI_News> knowList = ViewBag.KnowList as List<WI_News>;
                foreach (var know in knowList)
                {
                    string mark = (know.Important == 2) ? "red" : "";
                    <li>· <a href="/detail/index/@know.NewsID" target="_blank" title="@know.NewsTitle" class="@mark">@HtmlWorkshop.CutTitle(know.NewsTitle, 16)</a></li>  
                }
            }
            </ul>
        </div>
    </div>
</div>
<div class="main_m">
    <div class="contentBox">
        <div class="tab">
            <ul>
             <li class="current"><a href="/list/index/@ViewBag.BulletinID">通知公告</a></li>
                <li><a href="/list/index/@ViewBag.UnionNewsID">协会动态</a></li>
                <li class=""><a href="/list/index/@ViewBag.IndustryNewsID">行业动态</a></li>
            </ul>
            @*<span><a href="#">更多&gt;&gt;</a></span>*@
        </div>

        <div class="tab-content">
            <div class="imp_area">
            @{
                WI_News news3 = bulList.FirstOrDefault();
                if (news3 != null)
                {
                    <h1 class="imp_txt"><a href="/detail/index/@news3.NewsID" title="@news3.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(news3.NewsTitle, 22)</a></h1>
                    news3 = bulList.Skip(1).FirstOrDefault();
                    <h3 class="imp_subtxt">
                    @if (news3 != null)
                    {
                        <a href="/detail/index/@news3.NewsID" title="@news3.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(news3.NewsTitle, 16)</a>
                        news3 = bulList.Skip(2).FirstOrDefault();
                        if (news3 != null)
                        {
                            @: | <a href="/detail/index/@news3.NewsID" title="@news3.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(news3.NewsTitle, 16)</a>
                        }
                    }
                    </h3>
                }
            }
            </div>
            <div class="imp_main">
                @{string defimg_b = "/Resource/images/test4.png";}
                <div class="imp_m_t">
                    @{
                        //前面7条是较新的信息，后面5条是较旧的信息
                        var query_b = bulList.Skip(3).Take(7);
                        WI_News tempNews1_b = query_b.FirstOrDefault();
                        string tempImgPath1_b = tempNews1_b == null ? defimg_b : string.IsNullOrWhiteSpace(tempNews1_b.NewsCover) ? defimg_b : tempNews1_b.NewsCover;
                    }
                    <a href="@(tempNews1_b == null ? "#" : "/detail/index/" + tempNews1_b.NewsID)" target="_blank"><img src="@tempImgPath1_b" alt="" /></a>
                    <div class="imp_m_info">
                        <ul>
                        @{
                            foreach (var union in query_b)
                            {
                                string mark = (union.Important == 2) ? "red" : "";
                                <li>· <a href="/detail/index/@union.NewsID" target="_blank" title="@union.NewsTitle" class="@mark">@HtmlWorkshop.CutTitle(union.NewsTitle ?? string.Empty, 22)</a></li>
                            }
                        }
                        </ul>
                    </div>
                    <div class="cls">
                    </div>
                </div>
                <div class="imp_m_b">
                    <ul>
                    @{
                        var query1_b = bulList.Skip(10).Take(5);
                        foreach (var union in query1_b)
                        {
                        <li>
                            <span class="fl">· <a href="/detail/index/@union.NewsID" target="_blank" title="@union.NewsTitle">@HtmlWorkshop.CutTitle(union.NewsTitle ?? string.Empty, 28)</a></span>
                            <span class="gray fr">@((union.PubTime ?? union.CreateTime).ToString("yyyy-MM-dd"))</span>
                        </li>  
                        }
                    }
                    </ul>
                </div>
            </div>
            <div class="cls"></div>
        </div>


        <div class="tab-content hidden">
            <div class="imp_area">
            @{
                List<WI_News> unionList = ViewBag.UnionNewsList as List<WI_News>;
                WI_News news1 = unionList.FirstOrDefault();
                if (news1 != null)
                {
                    <h1 class="imp_txt"><a href="/detail/index/@news1.NewsID" title="@news1.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(news1.NewsTitle, 22)</a></h1>
                    news1 = unionList.Skip(1).FirstOrDefault();
                    <h3 class="imp_subtxt">
                    @if (news1 != null)
                    {
                        <a href="/detail/index/@news1.NewsID" title="@news1.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(news1.NewsTitle, 19)</a>
                        news1 = unionList.Skip(2).FirstOrDefault();
                        if (news1 != null)
                        {
                            @: | <a href="/detail/index/@news1.NewsID" title="@news1.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(news1.NewsTitle, 19)</a>
                        }
                    }
                    </h3>
                }
            }
            </div>
            <div class="imp_main">
                @{string defimg4 = "/Resource/images/test4.png";}
                <div class="imp_m_t">
                    @{
                        //前面7条是较新的信息，后面5条是较旧的信息
                        var query = unionList.Skip(3).Take(7);
                        WI_News tempNews1 = query.FirstOrDefault();
                        string tempImgPath1 = tempNews1 == null ? defimg4 : string.IsNullOrWhiteSpace(tempNews1.NewsCover) ? defimg4 : tempNews1.NewsCover;
                    }
                    <a href="@(tempNews1 == null ? "#" : "/detail/index/" + tempNews1.NewsID)" target="_blank"><img src="@tempImgPath1" alt="" /></a>
                    <div class="imp_m_info">
                        <ul>
                        @{
                            foreach (var union in query)
                            {
                                string mark = (union.Important == 2) ? "red" : "";
                                <li>· <a href="/detail/index/@union.NewsID" target="_blank" title="@union.NewsTitle" class="@mark">@HtmlWorkshop.CutTitle(union.NewsTitle ?? string.Empty, 22)</a></li>
                            }
                        }
                        </ul>
                    </div>
                    <div class="cls">
                    </div>
                </div>
                <div class="imp_m_b">
                    <ul>
                    @{
                        var query1 = unionList.Skip(10).Take(5);
                        foreach (var union in query1)
                        {
                        <li>
                            <span class="fl">· <a href="/detail/index/@union.NewsID" target="_blank" title="@union.NewsTitle">@HtmlWorkshop.CutTitle(union.NewsTitle ?? string.Empty, 28)</a></span>
                            <span class="gray fr">@((union.PubTime ?? union.CreateTime).ToString("yyyy-MM-dd"))</span>
                        </li>  
                        }
                    }
                    </ul>
                </div>
            </div>
            <div class="cls"></div>
        </div>
        <div class="tab-content hidden">
            <div class="imp_area">
            @{
                List<WI_News> induList = ViewBag.IndustryNewsList as List<WI_News>;
                WI_News news2 = induList.FirstOrDefault();
                if (news2 != null)
                {
                    <h1 class="imp_txt"><a href="/detail/index/@news2.NewsID" title="@news2.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(news2.NewsTitle, 22)</a></h1>
                    news2 = induList.Skip(1).FirstOrDefault();
                    <h3 class="imp_subtxt">
                    @if (news2 != null)
                    {
                        <a href="/detail/index/@news2.NewsID" title="@news2.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(news2.NewsTitle, 19)</a>
                        news2 = induList.Skip(2).FirstOrDefault();
                        if (news2 != null)
                        {
                            @: | <a href="/detail/index/@news2.NewsID" title="@news2.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(news2.NewsTitle, 19)</a>
                        }
                    }
                    </h3>
                }
            }
            </div>
            <div class="imp_main">
                <div class="imp_m_t">
                @{
                    //前面7条是较新的信息，后面5条是较旧的信息
                    var query2 = induList.Skip(3).Take(7);
                    WI_News tempNews2 = query2.FirstOrDefault();
                    string tempImgPath2 = tempNews2 == null ? defimg4 : string.IsNullOrWhiteSpace(tempNews2.NewsCover) ? defimg4 : tempNews2.NewsCover;
                }
                    <a href="@(tempNews2 == null ? "#" : "/detail/index/" + tempNews2.NewsID)" target="_blank"><img src="@tempImgPath2" alt="" /></a>
                    <div class="imp_m_info">
                        <ul>
                        @{
                            //前面7条是较新的信息，后面5条是较旧的信息
                            foreach (var indu in query2)
                            {
                                string mark = (indu.Important == 2) ? "red" : "";
                                <li>· <a href="/detail/index/@indu.NewsID" target="_blank" title="@indu.NewsTitle" class="@mark">@HtmlWorkshop.CutTitle(indu.NewsTitle ?? string.Empty, 22)</a></li>
                            }
                        }
                        </ul>
                    </div>
                    <div class="cls">
                    </div>
                </div>
                <div class="imp_m_b">
                    <ul>
                    @{
                        var query3 = induList.Skip(10).Take(5);
                        foreach (var indu in query3)
                        {
                        <li>
                            <span class="fl">· <a href="/detail/index/@indu.NewsID" target="_blank" title="@indu.NewsTitle">@HtmlWorkshop.CutTitle(indu.NewsTitle ?? string.Empty, 22)</a></span>
                            <span class="gray fr">@((indu.PubTime ?? indu.CreateTime).ToString("yyyy-MM-dd"))</span>
                        </li>  
                        }
                    }
                    </ul>
                </div>
            </div>
            <div class="cls"></div>
        </div>
    </div>
    <div class="contentBox">
        <div class="tab">
            <ul>
                <li class="current">会务展览</li>
            </ul>
            <span><a href="/list/index/@ViewBag.MeetingID">更多&gt;&gt;</a></span>
        </div>
        <div class="tab-content">
            <div class="imp_main">
                <div class="imp_m_t">
                @{
                    List<WI_News> meetList = ViewBag.MeetingList as List<WI_News>;
                    WI_News tempNews3 = meetList.FirstOrDefault();
                    string tempImgPath3 = tempNews3 == null ? defimg4 : string.IsNullOrWhiteSpace(tempNews3.NewsCover) ? defimg4 : tempNews3.NewsCover;
                }
                    <a href="@(tempNews3 == null ? "#" : "/detail/index/" + tempNews3.NewsID)" target="_blank"><img src="@tempImgPath3" /></a>
                    <div class="imp_m_info">
                        <ul>
                        @{
                            foreach (var meet in meetList)
                            {
                                string mark = (meet.Important == 2) ? "red" : "";
                                <li>· <a href="/detail/index/@meet.NewsID" target="_blank" title="@meet.NewsTitle" class="@mark">@HtmlWorkshop.CutTitle(meet.NewsTitle ?? string.Empty, 22)</a></li> 
                            }
                        }
                        </ul>
                    </div>
                    <div class="cls">
                    </div>
                </div>
            </div>
            <div class="cls">
            </div>
        </div>
    </div>
</div>
<div class="main_r">
    <div class="contentBox">
        <div class="con_bar">
            <span class="fl tit">教育培训</span><span class="fr"><a href="/list/index/@ViewBag.TrainingID">更多>></a></span>
            <div class="cls">
            </div>
        </div>
        <div class="con_Main">
            <img src="/Resource/images/test2.png" width="188px" height="92px" />
            <ul>
            @{
                List<WI_News> trainList = ViewBag.TrainingList as List<WI_News>;
                foreach (var train in trainList)
                {
                    string mark = (train.Important == 2) ? "red" : "";
                    <li>·<a href="/detail/index/@train.NewsID" target="_blank" title="@train.NewsTitle" class="@mark">@HtmlWorkshop.CutTitle(train.NewsTitle, 12)</a> </li>  
                }
            }
            </ul>
        </div>
    </div>
    <div class="contentBox">
        <div class="con_bar">
            <span class="fl tit">协会会刊</span><span class="fr"><a href="/list/index/@ViewBag.UnionMookID">更多>></a></span>
            <div class="cls">
            </div>
        </div>
        <div class="con_Main">
        @{
            List<WI_News> mookList = ViewBag.UnionMookList as List<WI_News>;
            foreach (var mook in mookList)
            {
                <div class="con_m_imgList">
                   <a href="/detail/index/@mook.NewsID"> <img src="@(string.IsNullOrWhiteSpace(mook.NewsCover) ? "/Resource/images/test3.png" : mook.NewsCover)" alt="@mook.NewsTitle" /></a>
                    <span><a href="/detail/index/@mook.NewsID">查阅</a></span>
                </div>
            }
        }
            <div class="cls"></div>
        </div>
    </div>

     <img src="/Resource/images/test2.png" width="190px" height="100px" />
</div>
<div class="cls"></div>
@Html.Action("ADBanner", "PublicPartialView", new { suiteId = 101 })
